<%--
  Created by IntelliJ IDEA.
  User: YYY-Work
  Date: 2017/5/15
  Time: 10:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
    <meta charset="UTF-8">
    <title>AdminLTE | Data Tables</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>

    <script src="<%=basePath%>/AdminLTE/js/jquery-2.1.1.min.js" type="text/javascript"></script>
    <link href="<%=basePath%>/AdminLTE/css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=basePath%>/AdminLTE/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
    <link href="<%=basePath%>/AdminLTE/themes/explorer/theme.css" media="all" rel="stylesheet" type="text/css"/>
    <script src="<%=basePath%>/AdminLTE/js/plugins/sortable.js" type="text/javascript"></script>
    <script src="<%=basePath%>/AdminLTE/js/fileinput.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/locales/fr.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/locales/es.js" type="text/javascript"></script>
    <script src="<%=basePath%>/AdminLTE/themes/explorer/theme.js" type="text/javascript"></script>



    <script src="<%=basePath%>/AdminLTE/js/bootstrap.js" type="text/javascript"></script>
    <link href="<%=basePath%>/AdminLTE/css/bootstrap.min.css" rel="stylesheet">
    <script src="<%=basePath%>/js/admin/utils.js" type="text/javascript" ></script>

</head>
<body class="skin-blue">
<!-- getHeader -->
<s:action name="getHeader" namespace="/privilege" executeResult="true"/>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- getMenus -->
    <s:action name="getMenus" namespace="/privilege" executeResult="true"/>

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>

            <small>医生详情</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Tables</a></li>
            <li class="active">Data tables</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">

                    <div class="box box-danger">

                        <div class="box-body">

                            <form id="form" class="form-horizontal" enctype="multipart/form-data" method="post"
                                  action="${basePath}/privilege/ajaxUpdateUser.action">
                                <fieldset>

                                    <input type="text" name="userid" value="${detailUser.userid}" style="display: none">
                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">用户编号</label>
                                        <div class="col-sm-2">
                                            <input type="text" id="userNo" name="userNo"
                                                   class="form-control" value="${detailUser.userNo}" readonly>
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">用户姓名</label>
                                        <div class="col-sm-2">
                                            <input type="text" id="userName" name="userName"
                                                   class="form-control" value="${detailUser.userName}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">用户头像</label>
                                        <input id="file-0a" class="file" type="file" multiple data-min-file-count="1">

                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">类型</label>
                                        <div class="col-sm-2">
                                            <input type="text" id="typeName" name="typeName"
                                                   class="form-control" value="${detailUser.typeName}" readonly>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">最后登录时间</label>
                                        <div class="col-sm-2">
                                            <input type="text" id="loginDatetime"
                                                   class="form-control" readonly value="${empty detailUser.loginDatetime ? '0000:00:00 00:00:00' : detailUser.loginDatetime}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">注册时间</label>
                                        <div class="col-sm-2">
                                            <input type="text" id="registerDate"
                                                   class="form-control" readonly  value="${empty detailUser.registerDate ? '0000:00:00 00:00:00' : detailUser.registerDate}">
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">邀请码</label>
                                        <div class="col-sm-2">
                                            <input type="text" name="bussinessCode"
                                                   class="form-control" readonly value="${empty detailUser.bussinessCode ? '无' : detailUser.bussinessCode}">
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">订单</label>
                                        <div class="col-sm-2">
                                            <label class="control-label">
                                                <a href="${basePath}/order/getOrderList.action?type=3&UserID=${detailUser.userid}">查看订单</a>
                                            </label>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">钱包</label>
                                        <div class="col-sm-2">
                                            <label class="control-label">
                                                <a href="#">查看钱包</a>
                                            </label>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1" style="text-align: right">是否启用</label>
                                        <div class="controls col-sm-2">
                                            <label class="radio inline">
                                                <input id="isInUse" name="isUsedFlag" type="radio" checked="checked" value="1">
                                                启用
                                            </label>
                                            <label class="radio inline">
                                                <input id="isNotInUse" name="isUsedFlag" type="radio" value="0">
                                                不启用
                                            </label>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1" style="text-align: right">是否是老用户</label>
                                        <div class="controls col-sm-2">
                                            <label class="radio inline">
                                                <input name="isExportFlag" id="isExportFlag1" type="radio" checked="checked" value="1">
                                                是
                                            </label>
                                            <label class="radio inline">
                                                <input name="isExportFlag" id="isExportFlag2" type="radio" value="0">
                                                不是
                                            </label>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-1 control-label">备注</label>
                                        <div class="controls col-sm-4">
                                            <div class="textarea">
                                                <textarea type="" name="comment" rows="4" class="form-control" style="width: 100%">
                                                    ${empty detailUser.comment ? '' : detailUser.comment}
                                                </textarea>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <label class="col-sm-1 control-label"></label>

                                        <div class="controls col-sm-4">
                                            <button class="btn btn-success" type="submit">保存</button>
                                            <button class="btn" type="button" style="margin-left: 30px">重置密码</button>
                                        </div>
                                    </div>

                                </fieldset>
                            </form>

                        </div><!-- /.box-body -->
                    </div><!-- /.box -->

                </div><!-- /.box -->


            </div>
        </div>

    </section><!-- /.content -->
    </aside>

</div>
</body>
<script type="text/javascript">
    var isUsedFlag="${detailUser.isUsedFlag}";
    var isExportFlag="${detailUser.isExportFlag}";

    $(document).ready(new function () {

        if ("1"==isUsedFlag)
        {
            $("#isInUse").attr('checked', true);
        }else
        {
            $("#isNotInUse").attr('checked', true);
        }

        if ("1"==isExportFlag)
        {
            $("#isExportFlag1").attr('checked', true);
        }else
        {
            $("#isExportFlag2").attr('checked', true);
        }

        $("#file-0a").fileinput();
    })
</script>
</html>
